<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>圣杯布局</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            min-width: 600px; /*防止太窄使得三列换行  min-width = 2*left + right */
        }
        .header, .footer {
            width: 100%;
            height: 48px;
            background-color: aqua;
            line-height: 48px;
            text-align: center;
        }
        .container {
            padding-left: 200px;
            padding-right: 200px;
            overflow: hidden;
        }
        .container div {
            float: left;
            position: relative;
            height: 300px;
            line-height: 300px;
            text-align: center;
        }
        .left {
            width: 200px;
            background-color: pink;
            margin-left: -100%;
            left: -200px;
        }
        .right {
            width: 200px;
            background-color: pink;
            margin-right: -100%;
        }
        .center {
            width: 100%;
            background-color: bisque;
        }
        .footer {
            background-color: aquamarine;
            overflow: hidden;
            zoom: 1;
        }
    </style>
</head>
<body>
<div class="header">header</div>
<div class="container">
    <div class="center">center</div>
    <div class="left">left</div>
    <div class="right">right</div>
</div>
<div class="footer">footer</div>
</body>
</html>
